package com.atguigu03.threadsafe.runnablesafe.ex;

public class Customer implements Runnable{
     Account account;

    public Customer(Account account) {
        this.account = account;
    }

    @Override
    public void run() {
        synchronized (account) {
            for (int i = 0; i <3 ; i++) {
                account.deposit(1000);
            }
        }
    }
}
